Backlink: reference-notes-readme


AD - General Notes

Enter-PSSession -ComputerName -name

Use the above command from a PTH PS window to open a new PS session on a remote computer in the context of the impersonated user.

Get-ObjectAcl -Identity adminWebSvc -ResolveGUIDs | Foreach-Object {$_ | Add-Member -NotePropertyName SecurityIdentifier -NotePropertyValue (ConvertFrom-SID $_.SecurityIdentifier.value) -Force; $_}

Use the above command to get a list of ObjectAcls.

LAPS

Use the following command to search for LAPS passwords without having to import any Powershell Modules.

([adsisearcher]"(&(objectCategory=computer)(ms-MCS-AdmPwd=*)(sAMAccountName=*))").findAll() | ForEach-Object { Write-Host "" ; $_.properties.cn ; $_.properties.'ms-mcs-admpwd'}